/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/*
* OutputView.java
*
* Created on November 29, 2007, 9:10 PM
 */
package gui.genomemap.view.outputView;

import gui.genomemap.event.event.WorkerOutputEvent;
import gui.genomemap.event.event.WorkerOutputListener;
import gui.genomemap.outputModel.OutputModel;
import gui.genomemap.view.View;

import javax.swing.JDialog;

/**
 * <CODE>WorkerInputListener</CODE> is implemented to lock output options
 * after the run buton is hit. <CODE>ViewManager</CODE> obtains the
 * output model from <CODE>OutputView</CODE> via <CODE>View</CODE> and
 * submits that to the processor.
 * @author stewari1
 */
public class OutputView extends javax.swing.JPanel implements WorkerOutputListener {

    /** Field description */
    private View view = null;

    /** Field description */
    private OutputModel outputModel = null;

    /**
     * Creates new form OutputView
     */
    OutputView() {
        initComponents();
    }

    /**
     * should be overridden by the subclasses
     */
    void refresh() {}

    public OutputModel getOutputModel() {
        return outputModel;
    }

    public void setOutputModel(OutputModel workerOutputModel) {

        this.outputModel = workerOutputModel;

        refresh();
    }

    @Override
    public void doComGLHoodOutput(WorkerOutputEvent e) {}

    @Override
    public void doComPLHoodOutput(WorkerOutputEvent e) {}

    @Override
    public void doComJLHoodOutput(WorkerOutputEvent e) {}

    public View getView() {
        return view;
    }

    public void setView(View view) {
        this.view = view;
    }

    /**
     * This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */


    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);

        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(
                0, 400, Short.MAX_VALUE));
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(
                0, 300, Short.MAX_VALUE));

    }    // </editor-fold>//GEN-END:initComponents

    @Override
    public void doAnnealOutput(WorkerOutputEvent e) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void doProgCurveOutput(WorkerOutputEvent e) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    /**
     * must be overridden in the subclasses
     * @return
     */
    public JDialog getOptionsDialog() {
        return null;
    }

    public void enableRuntimeControl() {}


    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
